package com.gylang.crypto.config;

import com.gylang.crypto.resolver.CryptoArgumentResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @author gylang
 * data 2020/10/27
 * @version v0.0.1
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(cryptArgumentResolver());
    }



    @Bean
    public CryptoArgumentResolver cryptArgumentResolver() {
        return new CryptoArgumentResolver();
    }
}
